package com.itheima03.day15Test;

/**
 * @author 刘全
 * @date 2021/8/7
 */
public class Test1 {
    public static void main(String[] args) {
        //用lock锁解决线程安全
        Lock l = new Lock();
        Thread tr1 = new Thread(l,"窗口一");
        Thread tr2 = new Thread(l,"窗口二");
        Thread tr3 = new Thread(l,"窗口三");

        tr1.start();
        tr2.start();
        tr3.start();
    }
}
